blob: df10f475a315bdb61ec4987603b641ef03748eb7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
# eplXa is host end (local network bridge), eplXb is jail end.
# The corresponding pubnet interface is epwX, but that's not created for all jails.
{{ jail.name }} {
# STARTUP/LOGGING/VNET
vnet;
persist;
exec.clean;
exec.prestart = "";
exec.start = "/bin/sh /etc/rc";
exec.poststart = "";
exec.prestop = "";
exec.stop = "/bin/sh /etc/rc.shutdown";
exec.poststop = "";
exec.consolelog = "/var/log/jail_console_${name}.log";
# PERMISSIONS
allow.raw_sockets;
exec.clean;
mount.devfs;
# HOSTNAME/PATH
host.hostname = "${name}";
path = "/usr/local/jails/containers/${name}";
# JAIL-SPECIFIC CONFIGURATION
{% set t = lookup(
'ansible.builtin.first_found',
{
'files': [
'jail_confs/' ~ jail.name ~ '.j2',
'jail_confs/_default.j2',
],
'paths': [ playbook_dir ~ '/templates' ]
},
errors='ignore'
) %}
{% if t %}
{{ lookup('ansible.builtin.template', t) | indent(2, true) }}
{% endif %}
}
|